<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>转盘抽奖</title>

    <style>
        .zhuanpan{
            width: 472px;
            position: relative;
        }
        .zhen{
            position: absolute;
            left:130px;
            top:116px;
        }
        #pan{
            transition: all 3s;
        }
        a{
            color: #c01900;
            text-decoration: none;
        }
    </style>
</head>
<body>
<a href="随机数.html">随机数</a>
<br/>
<br/>
<div  class="zhuanpan">
    <img src="zhuanpan.png" id="pan" width="340px"/>
    <img src="wheel_center.png" class="zhen" onclick="choujiang()" width="80px"/>

</div>
<script>
    var luckyNum=[3600,3600+90,3600+180,3600+270,3600+45,3600+45,3600+45,3600+45,3600+45,3600+45];
function choujiang() {
    var i=Math.floor(Math.random()*11);
    pan.style.transform="rotate("+luckyNum[i]+"deg)";
}
</script>
</body>
</html>